//
//  XHomeController.m
//  XWeibo-OC
//
//  Created by Apple on 15/10/25.
//  Copyright © 2015年 Apple. All rights reserved.
//

#import "XHomeController.h"
#import "UIBarButtonItem+XExtension.h"

@interface XHomeController ()

@end

@implementation XHomeController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"首页";
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem barButtonItemWithTitle:@"注册" addTarget:self action:@selector(registerClick) forControlEvents:UIControlEventTouchUpInside];
    
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem barButtonItemWithTitle:@"登录" addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];
}

#pragma mark - 按钮点击事件
- (void)registerClick
{
    NSLog(@"registerClick");
}

- (void)login
{
    NSLog(@"login");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
